package com.feiyu.shopsAndgoods.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.feiyu.common.utils.PageUtils;
import com.feiyu.common.utils.Query;

import com.feiyu.shopsAndgoods.dao.DictGoodsDao;
import com.feiyu.shopsAndgoods.entity.DictGoodsEntity;
import com.feiyu.shopsAndgoods.service.DictGoodsService;


@Service("dictGoodsService")
public class DictGoodsServiceImpl extends ServiceImpl<DictGoodsDao, DictGoodsEntity> implements DictGoodsService {

    @Autowired
    private DictGoodsDao dictGoodsDao;

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<DictGoodsEntity> page = this.page(
                new Query<DictGoodsEntity>().getPage(params),
                new QueryWrapper<DictGoodsEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public List<DictGoodsEntity> getByDictGoodsLable(String dictGoodsLable) {
        return dictGoodsDao.getByDictGoodsLable(dictGoodsLable);
    }

}